/*
 * @Author: libo
 * @Date: 2023-08-22 09:47:56
 * @LastEditors: libo
 * @LastEditTime: 2024-07-22 15:43:21
 * @FilePath: \all-blog-master\blog-web\src\main.js
 * @Description: 
 * 
 */
import { createApp } from 'vue';
// import './style.css'
import '@/theme/index.scss';
import App from './App.vue';
import { router } from '@/router/index';
import store from '@/store/index';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';// 中文配置
import 'element-plus/theme-chalk/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'; // 图标
import ElementPlus from 'element-plus';
import LoadingAnimation from '@/components/animation/loading/loading.vue';
// 字体
import '@/assets/font/font.css';
// 图标
import '@/assets/iconfont/iconfont.css';
import '@/assets/iconfont/iconfont.js';
// 解决：Chrome 增加了新的事件捕获机制－Passive Event Listeners，导致触发了告警。
import 'default-passive-events'; 
// ========================= 富文本预览 =========================
import PerviewMarkdown from '@/components/article/preview-mark-down/preview-mark-down.vue';


let app = createApp(App);

// 全局注册加载动画组件
app.component('LoadingAnimation', LoadingAnimation);
// 注册elementplus 中文
app.use(ElementPlus, {
    locale: zhCn
});
// 全局注册element plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
};
app.use(store);
app.use(router);

// markdown 编辑器
app.component('PerviewMarkdown',PerviewMarkdown);
app.mount('#app');